package cn.ly817.jay.DAO;

import cn.ly817.jay.DTO.MissionInB;
import cn.ly817.jay.entity.Mission;
import cn.ly817.jay.enums.MissionState;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by LuoYu on 2016/12/7.
 */
@Repository
public interface MissionDao {
    //查询接收任务者需要处理的任务数目
    int getUnhandledNumByProcessorId(Long processorId);

    List<MissionInB> getUnhandledMissionListBypProcessorId(Long processorId);

    List<MissionInB> getFinishedMissionListBypProcessorId(Long processorId);

    Mission getMissionDetailById(Long missionId);

    //多参数
    void swiftMissionState(@Param("missionId")long missionId, @Param("state")int state);

    long getMissionOriginatorById(@Param("missionId")long missionId);

    void updateStateById(@Param("missionId")long missionId, @Param("state")int state);
}
